package cn.hpe.po;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * Datainfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "datainfo")
public class Datainfo implements java.io.Serializable {

	// Fields

	private Integer dataId;
	private Datatype datatype;
	private String dataName;
	private String dataUrl;
	private String dataSummary;
	private String dataImg;
	private Short videoData;
	private int dataViewCount;


	// Constructors

	/** default constructor */
	public Datainfo() {
	}

	/** full constructor */
	public Datainfo(Datatype datatype, String dataName, String dataUrl,
			String dataSummary,String dataImg, Short videoData) {
		this.datatype = datatype;
		this.dataName = dataName;
		this.dataUrl = dataUrl;
		this.dataSummary = dataSummary;
		this.dataImg = dataImg;
		this.videoData = videoData;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "DataId", unique = true, nullable = false)
	public Integer getDataId() {
		return this.dataId;
	}

	public void setDataId(Integer dataId) {
		this.dataId = dataId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "DTId")
	public Datatype getDatatype() {
		return this.datatype;
	}

	public void setDatatype(Datatype datatype) {
		this.datatype = datatype;
	}

	@Column(name = "DataName", length = 100)
	public String getDataName() {
		return this.dataName;
	}

	public void setDataName(String dataName) {
		this.dataName = dataName;
	}

	@Column(name = "DataUrl", length = 1000)
	public String getDataUrl() {
		return this.dataUrl;
	}

	public void setDataUrl(String dataUrl) {
		this.dataUrl = dataUrl;
	}

	@Column(name = "DataSummary")
	public String getDataSummary() {
		return this.dataSummary;
	}

	public void setDataSummary(String dataSummary) {
		this.dataSummary = dataSummary;
	}

	@Column(name = "VideoData")
	public Short getVideoData() {
		return this.videoData;
	}

	public void setVideoData(Short videoData) {
		this.videoData = videoData;
	}

	@Column(name="DataImg")
	public String getDataImg() {
		return dataImg;
	}

	public void setDataImg(String dataImg) {
		this.dataImg = dataImg;
	}
	@Column(name="DataViewCount")
	public int getDataViewCount() {
		return dataViewCount;
	}

	public void setDataViewCount(int dataViewCount) {
		this.dataViewCount = dataViewCount;
	}
}